<template>
  <view class="flex-col page">
    <view class="flex-col group_1">
      <view class="flex-col group_2">
        <view class="flex-row items-center">
          <image
		   :src="$IMG_URL+'open.png'"
           
            class="image_2"
          />
          <text class="text_1">账号注销</text>
        </view>
        <text class="text_2">永久注销且无法恢复，请谨慎操作</text>
      </view>
      <text class="text_3">账号注销后将放弃以下权益：</text>
      <text class="text_4">
        1、账号信息、第三方授权信息将被清空且无法恢复。 2、账号相关信息将会一并被删除且无法恢复。
        3、注销后手机号码可重新注册，所生成账号为全新的 账号，不包含注销账号的任何信息。
      </text>
      <view class="flex-col items-start text-wrapper">
        <text class="text_5">点击下方按钮，即表示你已阅读并了解以上风险</text>
      </view>
      <view class="flex-col group_4">
        <view class="flex-col items-center button" @click="confirm"><text class="text_6">我已清楚风险，确定继续</text></view>
        <view class="flex-col items-center button_1"><text class="text_7">返回</text></view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    components: {},
    data() {
      return {};
    },
    methods: {
		confirm()
		{
			uni.showModal({
				title: '提示',
				content: '请再次确认，你已了解注销风险, 并要继续执行该操作',
				success: (res) =>{
					if (res.confirm) {
					  this.sublay();
						
					} else if (res.cancel) {
						console.log('用户点击取消');
					}
				}
			});
		},
		sublay(){
			let logoutType=uni.getStorageSync('logoutType');
			let reason=uni.getStorageSync('reason');
			this.$http('common.cancellation',{
				logoutReason:reason,
				logoutType:logoutType
			}).then(res=>{
				if(res.code==200){
					uni.navigateTo({
						url:"/pages/common/security/layout5"
					})
					uni.clearStorageSync();
				}else{
					uni.showToast({
						icon:"error",
						title:res.msg
					})
				}
			})
		}
	},
  };
</script>

<style scoped lang="css">
  .page {
    background-color: #ffffffff;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
  }
  .group_1 {
    padding: 0 30.5rpx 39rpx 31.5rpx;
    flex: 1 1 auto;
    overflow-y: auto;
  }
  .group_2 {
    padding: 32rpx 0 41rpx;
    border-bottom: solid 1rpx #ededed;
  }
  .text_3 {
    margin-top: 29rpx;
    align-self: flex-start;
    color: #333333;
    font-size: 32rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 38rpx;
  }
  .text_4 {
    margin-top: 40rpx;
    color: #333333;
    font-size: 28rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 48rpx;
    text-align: left;
  }
  .text-wrapper {
    margin-top: 74rpx;
    padding-top: 30rpx;
    height: 58rpx;
    border-top: solid 1rpx #ededed;
  }
  .group_4 {
    margin-top: 374rpx;
  }
  .text_2 {
    margin-top: 34rpx;
    align-self: flex-start;
    color: #333333;
    font-size: 28rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 33rpx;
  }
  .text_5 {
    color: #ff371d;
    font-size: 24rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 28rpx;
  }
  .button {
    padding: 25rpx 0 ;
    background-color: #1d6aff;
    border-radius: 44rpx;
  }
  .button_1 {
    margin-top: 31rpx;
    padding: 25rpx 0 ;
    border-radius: 44rpx;
    background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b127f6d029820011531bae/16557836462092714380.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .image_2 {
  
    width: 34rpx;
    height: 36rpx;
  }
  .text_1 {
    margin-left: 16rpx;
   
    color: #333333;
    font-size: 32rpx;
    font-family: '.AppleSystemUIFont';
  
    letter-spacing: 1.28rpx;
  }
  .text_6 {
    color: #ffffff;
    font-size: 32rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 38rpx;
  }
  .text_7 {
    color: #1d6aff;
    font-size: 32rpx;
    font-family: '.AppleSystemUIFont';
    line-height: 38rpx;
  }
</style>